import {request} from 'umi';
//获取数据
export const getPageList = (page:number,pageSize=12) => {
    console.log('service...')
    return request('/api/page',{
        method:'GET',
        params:{
            page,pageSize
        }
    })
    
}
// 删除
export const delPageList = (params:string) => {
    console.log('service...')
    return request(`/api/page/${params}`,{
        method:'DELETE'        
    })
    
}
// 上线下线
interface ProspTypeChange {
    [props:string]:string
}
export const changePageStatus = (props:ProspTypeChange) => {
    return request(`/api/page/${props.id}`,{
        method:'PATCH',
        data:{
            status: props.status
        }
    })
}